package main.entities;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity(name = "User")
@Table(name = "users")
public class User implements Serializable {

	/**
	 * GUID for Serializable.
	 */
	private static final long serialVersionUID = -2609488469216765419L;
	
	private Integer id = 0;
	private String fName = "";
	private String middleInitial = "";
	private String lName = "";
	private String uName = "";
	private String password = "";
	private String activeFlag = "";
	
	public User() {
		
	}

	public User(Integer id, String fName, String mInitial, String lName, String uName, String password, String activeFlag) {
		super();
		this.id = id;
		this.fName = fName;
		this.middleInitial = mInitial;
		this.lName = lName;
		this.uName = uName;
		this.password = password;
		this.activeFlag = activeFlag;
	}
	
	@Id
	@SequenceGenerator(name = "UserIdSeq", sequenceName = "users_id_seq", allocationSize = 1)
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "UserIdSeq")
	@Column(name = "id")
	public Integer getId() {
		return id;
	}

	@Column(name = "fname", length = 50)
	public String getfName() {
		return fName;
	}
	
	@Column(name = "mi", length = 1)
	public String getMiddleInitial() {
		return middleInitial;
	}
	
	@Column(name = "lname", length = 50)
	public String getlName() {
		return lName;
	}
	
	@Column(name = "uname", length = 50)
	public String getuName() {
		return uName;
	}
	
	@Column(name = "password", length = 50)
	public String getPassword() {
		return password;
	}
	
	@Column(name = "active_flag", length = 1)
	public String getActiveFlag() {
		return activeFlag;
	}
	
	public void setId(Integer id) {
		this.id = id;
	}
	
	public void setfName(String fName) {
		this.fName = fName;
	}
	
	public void setMiddleInitial(String middleInitial) {
		this.middleInitial = middleInitial;
	}
	
	public void setlName(String lName) {
		this.lName = lName;
	}
	
	public void setuName(String uName) {
		this.uName = uName;
	}
	
	public void setPassword(String password) {
		this.password = password;
	}
	
	public void setActiveFlag(String activeFlag) {
		this.activeFlag = activeFlag;
	}
	
}
